<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex 弹性布局</title>
</head>
<body>
    <div class="container">
        <div class="left">左侧</div>
        <div class="right">右侧</div>
    </div>
</body>
<style>
    *{
        margin: 0;
        padding: 0;
    }
    .left{
        background-color: red;
       flex: 1 2 500px;
    }
    .right{
        background-color: green;
        flex: 2 1 400px;
    }
    .container{
        display: flex;
        height: 300px;
        width: 600px;
       
    }
</style>
</html>